Method: OpenCV::CvTwoPoints#[]
- Defined in:
- ext/opencv/cvtwopoints.cpp
#[](index) ⇒ Object
Return value of index dimension.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'ext/opencv/cvtwopoints.cpp', line 65
VALUE
rb_aref(VALUE self, VALUE index)
{
switch (NUM2INT(index)) {
case 0:
return cCvPoint::new_object(CVTWOPOINTS(self)->p1);
break;
case 1:
return cCvPoint::new_object(CVTWOPOINTS(self)->p2);
break;
default:
rb_raise(rb_eIndexError, "index should be 0...2");
break;
}
return Qnil;
}
|